package com.sunxd.vue.application.controller;

import com.sunxd.vue.bean.Response;
import com.sunxd.vue.bean.request.LoginCheckRequest;
import com.sunxd.vue.bean.request.MenuRequest;
import com.sunxd.vue.bean.response.MenuRes;
import com.sunxd.vue.domain.bean.domain.User;
import com.sunxd.vue.domain.service.AuthService;
import com.sunxd.vue.domain.service.MenuService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.sunxd.vue.infrastructure.utils.ResponseHelper.or500;

/**
 * @author sun.xd
 * @description: description
 * @date 2024/4/2 13:52
 */
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/menu")
public class MenuController {

    private final MenuService menuService;


    @RequestMapping(value = "list")
    public Response<List<MenuRes>> menuList(@RequestBody MenuRequest req){
        return or500(()->menuService.menuList(req));
    }
}
